﻿<?xml version="1.0" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"
	namespace="DataAccess" assembly="DataAccess">

  <class name="DataAccess.EducationEvent, DataAccess" table="EVENT">
    <id name="Id" column="ID" type="Int64">
		<generator class="identity"/>
    </id>
    <property name="What" type="String" column="WHAT"/>
	<property name="GroupId" type="Int32" column="GROUP_ID"/>
	<property name="StartTime" type="DateTime" column="START_TIME"/>
	<property name="EndTime" type="DateTime" column="END_TIME"/>
	<property name="LastTime" type="DateTime" column="LAST_TIME"/>
	<property name="Repeat" type="String" column="REPEAT"/>	
	<property name="Where" type="String" column="WHERE"/>
    <property name="Description" type="String" column="DESCRIPTION"/>
	<property name="ResultType" type="String" column="RESULT_TYPE"/>
    <list name="Users" table="EVENT2USER">
		<key column="EVENT_ID" />
		<index column="ID" />
		<many-to-many
			column="USER_ID"
			class="DataAccess.User, DataAccess"
			outer-join="true" />
    </list>
	<many-to-one name="Module" column="MODULE_ID" 
		class="DataAccess.EducationModule, DataAccess" /> 
  </class>
</hibernate-mapping>

